/*
 * @Author: jiu yin
 * @Date: 2024-05-09 15:22:16
 * @LastEditTime: 2024-06-27 12:39:04
 * @LastEditors: jiu yin zhen jing
 * @FilePath: \studio-web-admin\src\comment\PicoStatus\index.tsx
 * jiu
 */
import "./index.scss";
import { deviceStatus } from "@/enum";

export default function index(props: any) {
	let { status } = props;

	const PicoStatus = (status: number) => {
		// 0 暂无状态 1 正常空闲 2  正常使用 3 正常停用 4 异常 5 异常终止托管 6离线
		let find = deviceStatus.find((item: any) => item.status === status);
		if (!find) return;
		return (
			<div className="pl-12px pr-12px  c-#fff text-14px h-28px brL line-height-28px " style={{ background: find.color }}>
				{find.label}
			</div>
		);
	};

	return <div>{PicoStatus(status)}</div>;
}
